<template>
  <router-view v-slot="{ Component }">
    <transition name="zoom-fade" mode="out-in" appear>
      <keep-alive>
        <component :is="Component" />
      </keep-alive>
    </transition>
  </router-view>
</template>

<script lang="ts">
  import { defineComponent } from 'vue'

  export default defineComponent({
    name: 'RouterTransition',
    props: {
      notNeedKey: {
        type: Boolean,
        default: false
      },
      animate: {
        type: Boolean,
        default: true
      }
    },
    setup() {
      return {}
    }
  })
</script>
